<script setup lang="ts">
import { usePwaStore } from 'vc/src/store/pwa';
import { isPwa } from '@vc/utils';

const pwaStore = usePwaStore();

// 主动触发 install
function handleInstall () {
  pwaStore.getEvent?.prompt();
}
</script>

<template>
  <vc-icon-text v-if="!pwaStore.getStatus && !isPwa()"
    icon="vi-desktop" text="安装桌面快捷方式"
    :distance="3" hoverColor="#0171f6"
    @click="handleInstall" class="mr-10px"/>
</template>
